<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <title>Index of {{url}}</title>
        <link rel="stylesheet" href="/__dev/styles.css" />
    </head>
    <body>
        <main>
            {{#if error}}
                <div class="box error">
                    <h1>
                        Error: 404 Not found
                    </h1>
                    <p>The resource <strong>{{url}}</strong> could not be found.</p>
                </div>
            {{/if}}

            <div class="box">
                <h1>
                    Index of
                    <strong>{{folder}}</strong>
                </h1>
                <ul>
                    {{#if hasParent}}
                        <li>
                            <a href="..">
                                <img src="/__dev/icons/parent.png" alt="" />
                                <strong>parent</strong>
                            </a>
                        </li>
                    {{/if}}
                    {{#each files}}
                        <li>
                            <a href="{{href}}" {{{target}}} class="{{#if isFolder}}folder{{/if}}">
                                <img src="/__dev/icons/{{mime}}.png" alt="" />
                                <strong>{{name}}{{#if isFolder}}/{{/if}}</strong>
                                <span>{{#if isFolder}}-{{else}}{{size}}{{/if}}</span>
                            </a>
                        </li>
                    {{/each}}
                </ul>
            </div>
            <footer style="display: none;">
                <a href="//www.nnjiandan.com" rel="external" target="_new">{{name}}/{{version}}</a>
                Serving <span>{{root}}</span> at {{ip}}:{{port}}
            </footer>
        </main>
    </body>
</html>
